package com.springboot.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.springboot.dao.UserMapper;
import com.springboot.entity.User;
import com.springboot.service.UserService;

@Service
public class UserServiceImpl implements UserService{

	@Autowired
	private UserMapper userMapper;
	
	/**
	 * 通过用户名加载一个用户对象，若用户名不存在则返回null
	 * @param userName
	 * @return
	 */
	@Override
	public User loadUserByUserName(String userName) {
		System.out.println("服务层执行");
		return userMapper.loadUserByUserName(userName);
	}

}
